package indzcraft.calc;
import java.util.Arrays;


public class Race {
	private String race = "";
	
	String[] allowed_races = { "dwarf","human","gnome","worgen","nightelf","bloodelf","goblin","undead","orc","troll" };
	
	public Race(String race){
		try {
			Arrays.sort(allowed_races);
			if(!(Arrays.binarySearch(allowed_races, race) >= 0)){
				throw new Exception("Race unknown: " + race);
			}
		} 
		catch (Exception e) {
			e.printStackTrace();
		}
	
		this.race = race;
	}

	public String get() {
		return race;
	}
	
}
